import request from '@/utils/request'

// ==================== 学习资料管理相关接口 ====================

interface GetLearningMaterialListParams {
  current: number
  size: number
  keyword?: string
  collegeName?: string
  subjectType?: string
  auditStatus?: number
  uploaderId?: number
  orderBy?: string
}

// 获取学习资料列表
export const getLearningMaterialList = (params: GetLearningMaterialListParams) => {
  return request({
    url: '/api/file/admin/learning-material/list',
    method: 'get',
    params,
  })
}

// 获取每日上传统计数据
export const getDailyUploadStats = () => {
  return request({
    url: '/api/file/admin/learning-material/daily-upload-stats',
    method: 'get',
  })
}

// 获取审核统计数据
export const getAuditStats = () => {
  return request({
    url: '/api/file/admin/learning-material/audit-stats',
    method: 'get',
  })
}

export type {
  GetLearningMaterialListParams,
}
